package com.zjw.shortlink.project.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.zjw.shortlink.project.common.convention.result.Result;
import com.zjw.shortlink.project.common.convention.result.Results;
import com.zjw.shortlink.project.dto.req.ShortLinkCreateReqDTO;
import com.zjw.shortlink.project.dto.resp.ShortLinkCreateRespDTO;
import org.springframework.stereotype.Component;

@Component
public class CustomBlockHandler {
    public Result<ShortLinkCreateRespDTO> handleCreateShortLink(ShortLinkCreateReqDTO requestParams, BlockException blockException) {
        return new Result<ShortLinkCreateRespDTO>().setCode("B100000").setMessage("当前访问网站人数过多，请稍后再试...");
    }
}
